home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
273_01
/
validate.cc
< prev
next >
Wrap
Text File
|
1988-01-09
|
461b
|
20 lines
validate(char *goods, char val_field)
{
/* This function will validate a character field for valid values.
*goods points to a character string that contains all valid character
values for the character field.
val_field is the character to validate.
return = 1 if val_field is valid.
return = 0 if val_fiels in not valid.
*/
int x;
for(x=0;x<strlen(goods);x++) {
if(val_field==*(goods + x)) return(1);
}
return(0);
}